<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <!-- 新 Bootstrap 核心 CSS 文件 -->
    <title>完善信息-协议</title>
    <link href="{{asset('vendor/bootstrap/css/bootstrap.min.css')}}" rel="stylesheet">
    <link rel="stylesheet" href="{{asset('css/buz/style.css')}}" />
    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
    <script src="{{asset('js/buz/jquery.min.js')}}"></script>
    <script src="{{asset('js/buz/commonLogin.js')}}"></script>
    <script src="{{asset('vendor/bootstrap/js/bootstrapValidator.js')}}"></script>
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="{{asset('vendor/bootstrap/js/bootstrap.min.js')}}"></script>
    <!--[if lte IE 9]>
    <script type="text/javascript">
        window.location.href = "/ie";
    </script>
    <![endif]-->
</head>
<body class="bgwhite">
<div id="header">
    <div class="container-fluid">
        <div class="navbar row">
            <div class="navbar-header col-xs-5 col-sm-3 col-md-2">
                <a class="navbar-brand col-xs-12 col-sm-12 col-md-12" href="index.html">
                    <img src="{{asset('image/logo.png')}}" class="right" width="150px" height="60px" style="margin-top:10px ;" />
                </a>
            </div>
            <nav class="top-nav col-xs-7 col-sm-9 col-md-10 padd">
                <div class="nav navbar-nav col-md-12 col-sm-12 col-xs-12 padd">
                    <div style="text-align: center; line-height: 77px; font-size: 18px; font-weight: bold;" class="col-md-11 col-xs-8">
                        技术协议
                    </div>
                    <div class="pull-right col-md-1  col-xs-4">
                        <i class="m-zhxx "></i>
                    </div>
                </div>

            </nav>
        </div>
    </div>
    <!-- Start .header-inner -->
</div>
<!--
        	作者：
        	时间：2017-11-22
        	描述：实名认证的信息进度条
        -->
<div class="info" style="margin-top: 80px;">
    <ul class="col-xs-12 col-ms-12 col-md-10 col-md-push-1" style="margin-top: 40px;">
        <li class="col-xs-4 col-ms-4 col-md-4">
            <cite class="circle bg5B">1</cite>
            <span class="line"></span>
        </li>
        <li class="col-xs-4 col-ms-4 col-md-4">
            <cite class="circle">2</cite>
            <span class="line"></span>
        </li>
        <li class="col-xs-4 col-ms-4 col-md-4">
            <cite class="circle">3</cite>
        </li>
    </ul>
    <ul class="col-xs-12 col-ms-12 col-md-10 col-md-push-1 mt20 textC">
        <li class="col-xs-4 col-ms-4 col-md-4 color5B">
            技术协议
        </li>
        <li class="col-xs-4 col-ms-4 col-md-4">
            基本信息
        </li>
        <li class="col-xs-4 col-ms-4 col-md-4">
            结算信息
        </li>
    </ul>
</div>
<div class="container padd mt20">
    <div style="width: 100%; height: 500px;">
        <div class="col-xs-12 col-sm-10 col-sm-push-1 col-md-8 col-md-push-2 neirong">
            @include('layouts.buz.protocol')
        </div>
    </div>
    <form action="{{route('buz.auth.protocol')}}" method="post" id="agreeForm">
        <input type="hidden" value="1" name="agree"/>
        {{csrf_field()}}
    </form>
    <p style="text-align: center;">
        <button type="button" class="btn btn-primary" id="agreeProtorl" disabled>同意该协议，下一步</button>
    </p>
</div>
{{--警告弹窗--}}
<div class="modal fade in"  tabindex="-1" role="dialog" id="errorModel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-body">
                <h4 class="text-center"></h4>
            </div>
            <div class="modal-footer text-xs-center">
                <button type="button" class="btn btn-danger" data-dismiss="modal">确定</button>
            </div>
        </div>
    </div>
</div>
<script>
    //	计算line的宽度
    var width=$(".line").width();
    var left=$(".circle").position().left;
    $(".line").css({"width":(width-40)+"px"});
    $(".line").css({"left":(left+40)+"px"});
    setTime($("#agreeProtorl"));
    $(function () {
        $("#agreeProtorl").click(function () {
            console.log("ddd")
            $("#agreeForm").submit();
        });
    });

    function setTime($btn){
        var time = 15;
        var setTime = setInterval(function(){
            if(time<=0){
                $btn.removeClass("disabled").text("同意该协议，下一步");
                $btn.attr("disabled",false);
                clearInterval(setTime);
            }else{
                $btn.attr("disabled",true);
                $btn.addClass("disabled").text("还有" + time + "s可点击");
                time--;
            }
        },1000);
    }
</script>
</body>



</html>
